<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="admin/images/app.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
	html,
	body {
		overflow: hidden;
		background: #FBFBFB;
	}
	
	.bs-left-container {
		width: 150px;
	}
	
	.bs-main-container {
		margin-left: 150px;
		overflow: auto;
	}
</style>
<!--{template common/header_simple_end}-->
<nav class="navbar navbar-default bs-navbar-default navbar-fixed-top" role="navigation" style="margin:0">
	<!--{template top}-->
</nav>
<div class="bs-container clearfix">
	<div class="bs-left-container  clearfix">
		<ul class="nav nav-pills nav-stacked nav-pills-leftguide" style="margin:10px 0;">

			<li <!--{if $group=='0' && !$org}-->class="active"<!--{/if}-->>
				<a href="{BASESCRIPT}?mod=$mod&op=default&group=0">{lang universal_application}</a>
			</li>
			<li <!--{if $group=='-1' && !$org}-->class="active"<!--{/if}-->>
				<a href="{BASESCRIPT}?mod=$mod&op=default&group=-1">{lang tourist_application}</a>
			</li>

			<li <!--{if $group=='1' && !$org}-->class="active"<!--{/if}-->>
				<a href="{BASESCRIPT}?mod=$mod&op=default&group=1">{lang rank_file_application}</a>
			</li>
			<li <!--{if $group=='3' && !$org}-->class="active"<!--{/if}-->>
				<a href="{BASESCRIPT}?mod=$mod&op=default&group=3">{lang system_administrator_application}</a>
			</li>
			<li <!--{if $group=='2' && !$org}-->class="active"<!--{/if}-->>
				<a href="{BASESCRIPT}?mod=$mod&op=default&group=2">{lang section_administrator_application}</a>
			</li>

			<li class="dropdown <!--{if $org}-->active<!--{/if}-->">
				<input id="sel_orgid" type="hidden" value="$depid" />
				<a href="#" type="button" id="orgid_Menu" class="dropdown-toggle" data-toggle="dropdown">
					$orgpath <span class="caret"></span>
				</a>
				<div id="orgid_dropdown_menu" class="dropdown-menu org-sel-box" role="menu" aria-labelledby="orgid_Menu">
					<iframe name="orgid_iframe" class="org-sel-box-iframe" src="index.php?mod=system&op=orgtree&ctrlid=orgid&nouser=1" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true"></iframe>
				</div>
			</li>

		</ul>

	</div>
	<div class="left-drager">
		<div class="left-drager-op">
			<div class="left-drager-sub"></div>
		</div>
	</div>
	<div class="bs-main-container">
		<div class="main-header" style="padding:0 10px;">
			<ul class="nav nav-pills nav-pills-bottomguide">
				<strong class="pull-left">{lang filtrate}:&nbsp;&nbsp;</strong>
				<li <!--{if $position==0}-->class="active"<!--{/if}-->>
					<a href="{BASESCRIPT}?mod=app&op=default&group=$group&depid=$depid&position=0">{lang all_location}</a>
				</li>
				<li <!--{if $position==2}-->class="active"<!--{/if}-->>
					<a href="{BASESCRIPT}?mod=app&op=default&group=$group&depid=$depid&position=2">{lang desktop}</a>
				</li>
				<li <!--{if $position==1}-->class="active"<!--{/if}-->>
					<a href="{BASESCRIPT}?mod=app&op=default&group=$group&depid=$depid&position=1">{lang start_menu}</a>
				</li>
				<li <!--{if $position==3}-->class="active"<!--{/if}-->>
					<a href="{BASESCRIPT}?mod=app&op=default&group=$group&depid=$depid&position=3">{lang taskbar}</a>
				</li>
				<li class="pull-right" style="padding-top:3px;">
					<form name="search" action="{BASESCRIPT}" method="get">
						<input type="hidden" name="mod" value="$mod" />
						<input type="hidden" name="op" value="$op" />
						<input type="hidden" name="group" value="$group" />
						<input type="hidden" name="depid" value="$depid" />
						<div class="input-group input-group-sm" style="width:150px;">
							<input name="keyword" type="text" value="$keyword" class="form-control" placeholder="{lang application_name}">
							<a href="javascript:;" class="input-group-addon" onclick="this.parentNode.parentNode.submit()"><i class="glyphicon glyphicon-search"></i></a>
						</div>
					</form>
				</li>
			</ul>
		</div>

		<div class="main-content clearfix" style="border-top:1px solid #FFF;">
			<form id="appform" name="appform" class="form-horizontal" action="{BASESCRIPT}?mod=app&op=default" method="post">
				<input type="hidden" name="appsubmit" value="true" />
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<table class="table table-hover">
					<thead>
						<th width="50">{lang sort}</th>
						<th>{lang application_name}</th>
						<th>{lang default_location}</th>
						<th><label class="checkbox checkbox-inline"><input type="checkbox" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'notdelete')"><strong>{lang allowed_delete}</strong></label></th>
					</thead>
					<!--{loop $list $value}-->
					<tr>
						<!-- <td width="20"><input type="checkbox" name="appids[]" value="$value[appid]"  /></td>-->
						<td width="40"><input type="text" class="form-control input-sm" name="disp[{$value[appid]}]" value="$value[disp]" style="width:45px;" /></td>
						<td>
							<a href="$value[appurl]"><img src="$value[appico]" />$value[appname]</a>
						</td>
						<td>
							<select name="position[{$value[appid]}]" class="form-control input-sm" style="width:120px">
								<!--{loop $positionarr $key $value1}-->
								<option value="$key" <!--{if $value[position]==$key}-->selected="selected"<!--{/if}-->>$value1</option>
								<!--{/loop}-->
							</select>
						</td>
						<td>
							<label class="checkbox checkbox-inline"><input type="checkbox" name="notdelete[{$value[appid]}]" value="1" <!--{if $value[notdelete]>0}-->checked<!--{/if}-->></label>&nbsp;<button id="clear_{$value['appid']}" style="width:100px;" class="btn btn-link" data-loading-text="{lang in_clear}" type="button" title="{lang clear_application_install}" onclick="clearAppFromUser('$value[appid]');return false">{lang clear}</button>
						</td>
					</tr>
					<!--{/loop}-->
					<tr>
						<th valign="middle"><input type="submit" class="btn btn-primary" value="{lang save_set}" /></th>
						<th colspan="3"> $multi</th>
					</tr>
				</table>
			</form>
			<div class="tip" style="margin:10px;color:#333;text-shadow:1px 1px 1px #FFF;line-height:1.8">
				<div class="alert alert-warning">
					<button type="button" class="close" data-dismiss="alert">&times;</button>
					<h5>{lang board_message}</h5>
					<ul>
						{lang appdefault_board_message_text}
					</ul>
				</div>
			</div>
		</div>

	</div>
</div>

<script type="text/javascript">
	jQuery('.left-drager').leftDrager_layout();
	var selorg = {};

	//添加
	selorg.add = function(ctrlid, vals) {
		if(vals[0].orgid && vals[0].orgid != 'other') {
			jQuery('#' + ctrlid + '_Menu').html(vals[0].path + ' <span class="caret"></span>');
			window.location.href = '{ADMINSCRIPT}?mod=app&op=default&depid=' + vals[0].orgid;
		}
	}

	function clearAppFromUser(appid, i) {
		if(!i) i = 0;
		var el = jQuery('#clear_' + appid);
		if(i == 0) el.button('loading');
		jQuery.getJSON('{ADMINSCRIPT}?mod=app&op=default&do=clear&appid=' + appid + '&i=' + i, function(json) {
			if(json.error) {
				el.html(json.error);
				window.setTimeout(function() {
					el.html('{lang clear}');
					el.button('reset');
				}, 1000);
			} else if(json.msg == 'continue') {
				clearAppFromUser(appid, json.start);
			} else if(json.msg == 'success') {
				window.setTimeout(function() { el.html('{lang clear_success}'); }, 1000);
				window.setTimeout(function() {
					el.html('{lang clear}');
					el.button('reset');
				}, 2000);
			}
		});
	}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->